<include file="Public/head" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.css" />
<style type="text/css">
    .custom_search{display: block;margin-top: 10px;width:100%;height:25px;}
    #budget,#car_type,#comefrom {
        -moz-appearance: none;
        background: rgba(0, 0, 0, 0) url("http://img1.isou365.cn/paimai/yunying/images/sanjiao.jpg") no-repeat scroll 130px 5px;
        border: 1px solid #d7d7d7;color: #666;float: left; height: 25px;line-height: 25px;margin-left: 10px;text-align: center;width: 150px;}
    .custom_01,.custom_02{display: block;margin-top: 10px;}
    .custom_02{padding-left: 7px;}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar"  menu="dzgc.dzdj" />
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li onclick="window.location.href = '/Custom/index'">待登记</li>
                <li onclick="window.location.href = '/Custom/track'">跟踪中</li>
                <li onclick="window.location.href = '/Custom/success'">登记成功</li>
                <li onclick="window.location.href = '/Custom/fail'" class="yuCurrent">登记失败</li>
            </ul>
        </div>
        <div class="yuSuo clearfix">
            <form id="searchFrom">
                <div class="custom_01 clearfix">
                    <input id="status" name="status" type="hidden" value="4"/>
                    <input type="text" id="id" name="id" placeholder="请输入登记ID" value="" class="suoDian" />
                    <input type="text" id="phone" name="phone" placeholder="请输入手机号" value="" class="suoDian" />
                    <select name="budget"  id="budget">
                        <option value="">全部预算</option>
                        <option value="1">5万以下</option>
                        <option value="2">5-10万</option>
                        <option value="3">10-15万</option>
                        <option value="4">15-20万</option>
                        <option value="5">20万以上</option>
                    </select>
                    <select name="car_type"  id="car_type">
                        <option value="">全部车型</option>
                        <option value="1">三厢车</option>
                        <option value="2">两厢车</option>
                        <option value="3">商旅车</option>
                        <option value="4">SUV</option>
                        <option value="5">MPV</option>
                        <option value="6">跑车</option>
                        <option value="7">电动车</option>
                    </select>
                    <select name="comefrom"  id="comefrom">
                        <option value="">全部渠道</option>
                        <option value="1">桌面官网</option>
                        <option value="2">移动官网</option>
                        <option value="3">移动客户端</option>
                        <option value="4">其它</option>
                    </select>
                    <input type="text" id="emp" name="emp" placeholder="请输入操作人" value="" class="suoDian" />
                </div>
                <div class="custom_02">
                    <input type="text" id="start_time" name="start_time" value="" readonly placeholder="开始时间" /><em></em>
                    <input type="text" id="end_time" name="end_time" value="" readonly placeholder="结束时间" style="margin-right: 10px;"/> 
                </div>
            </form>
            <input type="button" onclick="search();" id="search" value="搜索" class="suoSou">
        </div>
        <div class="yuList">
            <div class="listBox" id="listBox"></div>
        </div>
    </div>
    <script type="text/javascript">
        $("#start_time").ymdateplugin({
            changeMonth: true,
            changeYear: true
        });
        $("#end_time").ymdateplugin({
            changeMonth: true,
            changeYear: true
        });
        get_list(4);
        function get_list(status) {
            $.get("/Custom/custom_list", {"status": status}, function (data) {
                $("#listBox").html(data);
            }, "html");
        }
        function get_page(p) {
            var url = mkUrl();
            url += "&p=" + p;
            $.get("/Custom/custom_list?status=4", encodeURI(url), function (data) {
                $("#listBox").html(data);
            }, "html");
        }
        function search() {
            var url = mkUrl();
            $.get("/Custom/custom_list?status=4", encodeURI(url), function (data) {
                $("#listBox").html(data);
            }, "html");
        }
        function mkUrl() {
            var url = "";
            var id = $("#id").val();
            var phone = $("#phone").val();
            var budget = $("#budget").val();
            var car_type = $("#car_type").val();
            var comefrom = $("#comefrom").val();
            var emp  = $("#emp").val();
            var start_time = $("#start_time").val();
            var end_time = $("#end_time").val();
            if (id) {
                url += '&id=' + id;
            }
            if (phone) {
                url += '&phone=' + phone;
            }
            if (budget) {
                url += '&budget=' + budget;
            }
            if (car_type) {
                url += '&car_type=' + car_type;
            }
            if (comefrom) {
                url += '&comfrom=' + comefrom;
            }
            if (emp) {
                url += '&emp=' + emp;
            }
            if (start_time) {
                url += '&start_time=' + start_time;
            }
            if (end_time) {
                url += '&end_time=' + end_time;
            }
            return url;
        }
    </script>
    <include file="Public/foot" />